<template>
	<view class="content" >
		<view class="cont" @click="godesign()">
			<view class="conts" >
				<view style="width: 6rpx;height:56rpx;background-color: #323233;margin-right:10rpx;"></view>
				<view class="des">
					<view class="des_top">限时秒杀</view>
					<view class="des_bottom">9.9元抢购专区</view>
				</view>
			</view>

			<view class="log">
				查看更多
				<u-icon name="arrow-right"></u-icon>
			</view>
			<!-- <view class="clear"></view> -->
		</view>
		<!-- //列表 -->
		<view class="swiper">
			<swiper class="img-swipe" :autoplay="false" :circular="true" :indicator-dots="false" :interval="3000" :current="current"
			 @change="swiperChange">
				<swiper-item class="item" v-for="(it,dex) in swiper" :key="dex">
					<view class="commodity-list" v-for="(item,index) in it.commodityList" :key="index" @click="goSeckill()">
						<view class="cen-img">
							<image class="commodity-img" src="/static/nan.jpg" mode=""></image>
							<view class="ico_fen">
								<text class="fen">{{item.designerScore}}</text>
							</view>
						</view>

						<view class="aa">
							<view class="name">
								<view class="name_top">{{item.designerName}} </view>
								<view class="name_bottom">{{item.occupationName}}+{{item.designerLevel}}</view>
							</view>
							<view class="zj">
								<view class="zj_infor">
									￥{{item.designerPosition}}
									<text class="pirce-in">{{item.workingYears}}</text>
								</view>
							</view>
						</view>
					</view>
				</swiper-item>

			</swiper>
			<view class="dots-container">
				<view v-for="(item,index) in swiper" :key="index">
					<view :class="['dot', index === swiperCurrent ? 'active' : '']"></view>
				</view>
			</view>
		</view>
		<!-- <view style="height: 100px;"></view> -->
		<view class="hr"></view>
	</view>

</template>

<script>
	import {
		checkedId
	} from "@/utils/xuehua.js"

	export default {
		data() {
			return {
				current: 0,
				swiperCurrent: 0,
				swiper: [{
						commodityList: [{
								designerScore: '成都沙龙店',
								designerName: '欧莱雅染发',
								occupationName: '发型提案',
								designerLevel: '染发地方v还不是豆瓣',
								designerPosition: '399',
								workingYears: '599'
							},
							{
								designerScore: '成都沙龙店',
								designerName: '欧莱雅染发',
								occupationName: '发型提案',
								designerLevel: '染发地方v还不是豆瓣',
								designerPosition: '399',
								workingYears: '599'
							},
							{
								designerScore: '成都沙龙店',
								designerName: '欧莱雅染发',
								occupationName: '发型提案',
								designerLevel: '染发地方v还不是豆瓣',
								designerPosition: '399',
								workingYears: '599'
							},
						],

					},
					{
						commodityList: [{
								designerScore: '成都沙龙店',
								designerName: '欧莱雅染发',
								occupationName: '发型提案',
								designerLevel: '染发地方v还不是豆瓣',
								designerPosition: '399',
								workingYears: '599'
							},
							{
								designerScore: '成都沙龙店',
								designerName: '欧莱雅染发',
								occupationName: '发型提案',
								designerLevel: '染发地方v还不是豆瓣',
								designerPosition: '399',
								workingYears: '599'
							},
							{
								designerScore: '成都沙龙店',
								designerName: '欧莱雅染发',
								occupationName: '发型提案',
								designerLevel: '染发地方v还不是豆瓣',
								designerPosition: '399',
								workingYears: '599'
							},
						],

					}
				],
				city: '',

			}
		},

		methods: {
			swiperChange(e) {
				this.swiperCurrent = e.detail.current
			},
			
			// go 秒杀
			godesign(){
				uni.navigateTo({
					url:'/pagesB/index/seckill'
				})
			}
			
			
		},
		// async created() {
		// 	let _this = this
		// 	uni.$on('dizhi', res => {
		// 		_this.city = res.city
		// 		console.log('xxxxx', _this.city);
		// 		// this.getData()
		// 	})

		// },
		
	}
</script>

<style scoped lang="less">
	.content {

		// padding: 10rpx 10rpx;
		.cont {
			// width: 100%;
			padding: 15rpx 25rpx 25rpx 25rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.conts {
				display: flex;
				align-items: center;
			}

			.des {

				.des_top {

					font-size: 30rpx;
					font-family: PingFang;
					font-weight: bold;
					color: #333333;

				}

				.des_bottom {

					font-size: 20rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #333333;
				}
			}

			.log {
				font-size: 20rpx;
				color: #000000;
				float: right;
				padding-right: 1rpx;
				opacity: 0.5;
			}

			.clear {
				clear: both;
			}

		}

		.swiper {
			padding: 10rpx 25rpx 40rpx 25rpx;
			position: relative;

			.dots-container {
				position: absolute;
				left: 0;
				right: 0;
				bottom: 10rpx;
				display: flex;
				justify-content: center;

				.dot {
					margin: 0 8rpx;
					width: 12rpx;
					height: 12rpx;
					background: #b2b2b2;
					border-radius: 8rpx;
				}

				.dot.active {
					background: #00c6c2;
				}
			}

			.item {
				width: 100%;
				display: flex;
				align-items: flex-end;
				justify-content: space-between;

				.commodity-list {
					width: 32%;

					.cen-img {
						width: 100%;
						height: 260rpx;
						position: relative;

						image {
							width: 100%;
							height: 100%;
						}

						.ico_fen {
							width: 100%;
							// height: 30rpx;
							line-height: 28rpx;
							text-align: center;
							background: rgba(0, 0, 0, 0.5);
							position: absolute;
							bottom: 0px;

							.fen {
								font-size: 20rpx;
								font-family: PingFang;
								font-weight: 500;
								color: #FFFFFF;
							}


						}
					}



					.aa {
						padding: 10rpx;

						.name {


							.name_top {
								font-size: 20rpx;
								font-family: PingFang;
								font-weight: bold;
								color: #4E4E4E;
							}

							.name_bottom {
								padding: 5rpx 0;
								font-size: 16rpx;
								font-family: PingFang SC;
								font-weight: 400;
								color: #323232;
								overflow: hidden;
								text-overflow: ellipsis;
								white-space: nowrap;

							}
						}

						.zj {
							padding-top: 5rpx;

							.zj_infor {
								font-size: 16rpx;
								font-family: PingFang SC;
								font-weight: 400;
								color: #323232;

								.pirce-in {
									margin-left: 20rpx;
									text-decoration: line-through;
								}
							}
						}

					}

				}
			}

		}
	}



	.hr {
		margin-top: 30rpx;
		width: 100%;
		height: 9rpx;
		background: #E7E7E7;
	}
</style>
